javascript while loop: this loop can execute a block of code as long as a specified condition is true.

working of while loop

the do while loop: this loop will execute the code once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.